'''
Author: LHY 2601958675@qq.com
Date: 2023-07-18 15:32:50
LastEditors: LHY
LastEditTime: 2023-07-19 11:44:29
Description: 第三 query
'''

from pyquery import PyQuery as py
import requests

def get_page_source(url):
    res = requests.get(url=url)
    return res.text

def parse_page_source(html):
    doc = py(html)
    ansy = doc(".fl").items()
    for mt in ansy:
        print(mt.text(),mt.attr("class"))

    return ansy 

def main():
    url = "https://k.autohome.com.cn/146"
    html = get_page_source(url)
    ans = parse_page_source(html)
    # print(ans)
    pass

main()